#include "BulletCollision/Gimpact/gim_contact.h"
#ifdef __cplusplus
extern "C" {
#endif
GIM_CONTACT* bullet_NewGIM_CONTACT(){
	GIM_CONTACT* wrap_out = new GIM_CONTACT();
	return wrap_out;
}

GIM_CONTACT* bullet_NewGIM_CONTACT1(GIM_CONTACT* contact){
	GIM_CONTACT const& c_arg_contact=(GIM_CONTACT const&)(*contact);
	GIM_CONTACT* wrap_out = new GIM_CONTACT(c_arg_contact);
	return wrap_out;
}

GIM_CONTACT* bullet_NewGIM_CONTACT2(btVector3* point,btVector3* normal,double depth,unsigned int feature1,unsigned int feature2){
	btVector3 const& c_arg_point=(btVector3 const&)(*point);
	btVector3 const& c_arg_normal=(btVector3 const&)(*normal);
	btScalar c_arg_depth=depth;
	unsigned int c_arg_feature1=feature1;
	unsigned int c_arg_feature2=feature2;
	GIM_CONTACT* wrap_out = new GIM_CONTACT(c_arg_point,c_arg_normal,c_arg_depth,c_arg_feature1,c_arg_feature2);
	return wrap_out;
}

unsigned int bullet_GIM_CONTACT_calc_key_contact(GIM_CONTACT* c_this){
	unsigned int c_out = c_this->calc_key_contact();
	unsigned int wrap_out = (c_out);
	return wrap_out;
}

double bullet_GIM_CONTACT_GetFieldOfM_depth(GIM_CONTACT* c_this){
	return (double)(c_this->m_depth);
}

double bullet_GIM_CONTACT_GetFieldOfM_distance(GIM_CONTACT* c_this){
	return (double)(c_this->m_distance);
}

unsigned int bullet_GIM_CONTACT_GetFieldOfM_feature1(GIM_CONTACT* c_this){
	return (unsigned int)(c_this->m_feature1);
}

unsigned int bullet_GIM_CONTACT_GetFieldOfM_feature2(GIM_CONTACT* c_this){
	return (unsigned int)(c_this->m_feature2);
}

btVector3* bullet_GIM_CONTACT_GetFieldOfM_normal(GIM_CONTACT* c_this){
	return (btVector3*)(&c_this->m_normal);
}

btVector3* bullet_GIM_CONTACT_GetFieldOfM_point(GIM_CONTACT* c_this){
	return (btVector3*)(&c_this->m_point);
}

void bullet_GIM_CONTACT_interpolate_normals(GIM_CONTACT* c_this,btVector3* normals,unsigned int normal_count){
	btVector3 * c_arg_normals=(btVector3 *)(void*)(normals);
	unsigned int c_arg_normal_count=normal_count;
	c_this->interpolate_normals(c_arg_normals,c_arg_normal_count);
}

#ifdef __cplusplus
}
#endif
